<?php
namespace User\Model;
use Think\Model;

class MemberClassModel extends Model
{
    CONST STATUS_ACTIVE = 1;//正常、已发布
    CONST STATUS_DELETE = 9;//已删除

    public static function getUnit($value = 'all'){
        $label = [
            '1' => '日',
            '2' => '周',
            '3' => '月',
            '4' => '年'
        ];
        if($value === 'all'){
            return $label;
        }
        if(array_key_exists($value,$label)){
            return $label[$value];
        }
        return '未知';
    }
}
?>